import axios from "axios";
import url from "@/global/global"
export const requests=axios.create({
    baseURL: url.url
})
// 请求拦截器
requests.interceptors.request.use(
    config => {
//  token && (config.headers.Authorization = token)
        const token = localStorage.getItem('token');
        token && (config.headers.token = token)
        return config
    },
    error => {
        return Promise.error(error)
    }
)
